package com.anbang.website.service;

import java.util.Map;

import com.google.common.collect.Maps;

import net.sf.json.JSONObject;

/**
 * 商品helper
 */
public class ProductionsHelper {

	public static JSONObject prodList(String proName, String qtype, String proCatalog, int pageNo, int pageSize){
		Map<String, Object> map = Maps.newHashMap();
		map.put("qtype", qtype);
		map.put("proName", proName);
		map.put("proCatalog", proCatalog);		
		map.put("pageNo", pageNo);
		map.put("pageSize", pageSize);
		return ServiceHelper.post(ServiceDefine.SVR_PROLIST, map);
	} 
	
	public static JSONObject getProd(Long id){
		return ServiceHelper.post(ServiceDefine.SVR_PRODUCTION, String.format("{\"productionsId\":%d}", id));
	}

	public static JSONObject getProdPrice(String prodId, String acount, Long bpId, Long cId){
		Map<String, Object> map = Maps.newHashMap();
		map.put("productionsId", prodId);
		map.put("businesspersonId", bpId);
		map.put("acount", acount);
		map.put("customerId", cId);
		return ServiceHelper.post(ServiceDefine.SVR_PRODPRICE, map);
	}
	
	
}
